import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'
import IndexView from '../views/IndexView.vue'

Vue.use(VueRouter)

const routes = [
  //首页（包含商品列表）
  {
    path: '/',
    name: 'index',
    component: IndexView
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  },
  {
    path: '/add_goods_demo',
    name: 'add_goods_demo',
    component: () => import(/* webpackChunkName: "about" */ '../views/AddGoodsDemoView.vue')
  },
  //商品列表 -- 可以不看
  {
    path: '/goodslist',
    name: 'goodslist',
    component: () => import(/* webpackChunkName: "about" */ '../views/GoodsListView.vue')
  },
  //商品明细
  {
    path: '/detail',
    name: 'detail',
    component: () => import(/* webpackChunkName: "about" */ '../views/GoodsDetailView.vue')
  },
  
  {
    path: '/week2',
    name: 'week2',
    component: () => import(/* webpackChunkName: "about" */ '../views/Week2ExamView.vue')
  },
  //购物车列表
  {
    path: '/car/list',
    name: 'car/list',
    component: () => import(/* webpackChunkName: "about" */ '../views/CarListView.vue')
  },
  
  //结算页面
  {
    path: '/car/settle',
    name: 'car/settle',
    component: () => import(/* webpackChunkName: "about" */ '../views/SettlementView.vue')
  },
  //支付页面
  {
    path: '/car/pay',
    name: 'car/pay',
    component: () => import(/* webpackChunkName: "about" */ '../views/PayView.vue')
  },
  //支付页面(测试)
  {
    path: '/car/pay/test',
    name: 'car/pay/test',
    component: () => import(/* webpackChunkName: "about" */ '../views/AlipayTestView.vue')
  },

  //个人中心 - 我的订单
  {
    path: '/center/order',
    name: 'center/order',
    component: () => import('../views/center/MyOrderView.vue')
  },
  {
    path: '/fuxi/002',
    name: 'fuxi/002',
    component: () => import('../views/fuxi/Goods002View.vue')
  },
  {
    path: '/fuxi/010',
    name: 'fuxi/010',
    component: () => import('../views/fuxi/Page010View.vue')
  },
  {
    path: '/fuxi/005',
    name: 'fuxi/005',
    component: () => import('../views/fuxi/Page005View.vue')
  }
  
]

const router = new VueRouter({
  routes
})

export default router
